//
//  OneImageCell.m
//  Focus
//
//  Created by dlios on 14-10-28.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "OneImageCell.h"

@implementation OneImageCell
-(void)dealloc{
    [_autherName release];
    [_titleLabel release];
    [_icon release];
    [_rightImage release];
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        self.titleLabel = titleLabel;
        [titleLabel release];
        [self.contentView addSubview:self.titleLabel];
        
        UILabel *autherName = [[UILabel alloc]initWithFrame:CGRectZero];
        self.autherName = autherName;
        [autherName release];
        [self.contentView addSubview:self.autherName];
       
        UIImageView *icon = [[UIImageView alloc]initWithFrame:CGRectZero];
        self.icon = icon;
        [icon release];
        [self.contentView addSubview:self.icon];
        
        UIImageView *rightImage = [[UIImageView alloc]initWithFrame:CGRectZero];
        self.rightImage = rightImage;
        [rightImage release];
        [self.contentView addSubview:self.rightImage];
        
        
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(20, 20, 200, 40);
    self.titleLabel.font = [UIFont systemFontOfSize:16];
    self.titleLabel.numberOfLines = 10;
    
    self.autherName.frame = CGRectMake(20, 70, 80, 30);
    self.autherName.numberOfLines = 10;
    self.autherName.font = [UIFont systemFontOfSize:12];
    self.icon.frame = CGRectMake(120, 75, 30, 20);
    self.rightImage.frame = CGRectMake(230, 20, 80, 80);
    
    
}
- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
